<?php

namespace Database\Factories;

use App\Models\Product;
use Illuminate\Database\Eloquent\Factories\Factory;

class ProductFactory extends Factory
{
    protected $model = Product::class;
    
    public function definition()
    {
	    $cover = $this->faker->randomElement([
		    "https://cdn.learnku.com/uploads/images/201806/01/5320/7kG1HekGK6.jpg",
		    "https://cdn.learnku.com/uploads/images/201806/01/5320/1B3n0ATKrn.jpg",
		    "https://cdn.learnku.com/uploads/images/201806/01/5320/r3BNRe4zXG.jpg",
		    "https://cdn.learnku.com/uploads/images/201806/01/5320/C0bVuKB2nt.jpg",
		    "https://cdn.learnku.com/uploads/images/201806/01/5320/82Wf2sg8gM.jpg",
		    "https://cdn.learnku.com/uploads/images/201806/01/5320/nIvBAQO5Pj.jpg",
		    "https://cdn.learnku.com/uploads/images/201806/01/5320/XrtIwzrxj7.jpg",
		    "https://cdn.learnku.com/uploads/images/201806/01/5320/uYEHCJ1oRp.jpg",
		    "https://cdn.learnku.com/uploads/images/201806/01/5320/2JMRaFwRpo.jpg",
		    "https://cdn.learnku.com/uploads/images/201806/01/5320/pa7DrV43Mw.jpg",
	    ]);
	
	    return [
		    'category_id'       => $this->faker->randomElement([4,5,6,7,8]),
		    'title'             => $this->faker->word,
		    'title_long'        => $this->faker->word,
		    'description'       => $this->faker->sentence,
		    'cover'             => $cover,
		    'price_lowest'      => 0,
		    'price_market'      => 0,
		    'sold_count'        => 0,
		    'recommendation'    => [
			    'brother long is handsome',
			    'brother long is gorgeous',
			    'brother long is noble',
		    ],
		    'is_sale'           => true,
		    'is_returnable'     => true,
		    'is_gold_storm' => true,
		    'is_gold_bean' => true
	    ];
    }
}
